const { DataTypes } = require('sequelize');
const sequelize = require('../db/seq')
const {NUMBER} = require("sequelize/lib/data-types");
const User = sequelize.define('user', {
    // 在这里定义模型属性
    userName: {
        type: DataTypes.STRING,
        allowNull: false,
        comment:'电话'
    },
    companyName : {
        type: DataTypes.STRING,
        allowNull: true,
        comment:'公司名称'
    },
    email : {
        type: DataTypes.STRING,
        allowNull: true,
        comment:'邮箱'
    },
    password : {
        type: DataTypes.STRING,
        allowNull: false,
        comment:'qq'
    },
    userType: {
        type: DataTypes.STRING,
        allowNull: true,
        defaultValue: '1',
        comment:'用户类型'
    }
},{
   timestamps: false
});
//强制同步数据库（创建数据表）
// User.sync({ force: true });
// User.sync({ alter: true });
module.exports = User
